
		**********************************************************
		** File: 4_ldest_EBA_results.do							**
		** Paper: Human Trafficking Indicators: A New Dataset	**
		** Author: Richard Frank								**
		** Date: July 27, 2021									**
		** Task: Summarizing labor destination results by IV	**
 		**********************************************************
 
	clear
	version 16.1
	set seed 1234
	cd  "~"
 
	********************** 
	** 1 agr_employment **
	**********************	
						
	use "eba_ldest_1.dta", clear
	gen x="F.ldest:agr_employment"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 
	********************* 
	** 2 Latin America **
	*********************	
						
	use "eba_ldest_2.dta", clear
	gen x="F.ldest:america_l"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	***************** 
	** 3 N America **
	*****************	
						
	use "eba_ldest_3.dta", clear
	gen x="F.ldest:america_n"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	******************** 
	** 4 conflict_ext **
	********************	
						
	use "eba_ldest_4.dta", clear
	gen x="F.ldest:conflict_external"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	******************** 
	** 5 conflict_int **
	********************	
						
	use "eba_ldest_5.dta", clear
	gen x="F.ldest:conflict_internal"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	******************** 
	** 6 conflict_int **
	********************	
						
	use "eba_ldest_6.dta", clear
	gen x="F.ldest:cpi"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	************** 
	** 7 E Asia **
	**************	
						
	use "eba_ldest_7.dta", clear
	gen x="F.ldest:easia_pacific"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	***************** 
	** 8 Energy use**
	*****************	
						
	use "eba_ldest_8.dta", clear
	gen x="F.ldest:energyuse"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	*********************** 
	**  9 Ethnic tension **
	***********************	
						
	use "eba_ldest_9.dta", clear
	gen x="F.ldest:ethnic_tension"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	**************** 
	**  10 Ethnic **
	****************	
						
	use "eba_ldest_10.dta", clear
	gen x="F.ldest:ethnic"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	*************** 
	**  11 Europe *
	***************	
						
	use "eba_ldest_11.dta", clear
	gen x="F.ldest:europe"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 			
	***************** 
	**  12 execleft *
	*****************	
						
	use "eba_ldest_12.dta", clear
	gen x="F.ldest:execleft"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	*************** 
	**  13 execright *
	***************	
						
	use "eba_ldest_13.dta", clear
	gen x="F.ldest:execright"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	************ 
	**  14 FDI *
	************	
						
	use "eba_ldest_14.dta", clear
	gen x="F.ldest:fdi_gdpl"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	***************** 
	**  15 food_bev *
	*****************	
						
	use "eba_ldest_15.dta", clear
	gen x="F.ldest:food_bev"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	***************** 
	**  16 homicide *
	*****************	
						
	use "eba_ldest_16.dta", clear
	gen x="F.ldest:homicides"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	*************** 
	**  17 infant *
	***************	
						
	use "eba_ldest_17.dta", clear
	gen x="F.ldest:infant_mortality"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	*************** 
	**  18 KOFSoG *
	***************	
						
	use "eba_ldest_18.dta", clear
	gen x="F.ldest:KOFSoGI"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	***************** 
	**  19 Language *
	*****************	
						
	use "eba_ldest_19.dta", clear
	gen x="F.ldest:language"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 											
	********************** 
	**  20 legal british *
	**********************	
						
	use "eba_ldest_20.dta", clear
	gen x="F.ldest:legal_british"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 											
	********************* 
	**  21 legal french *
	*********************	
						
	use "eba_ldest_21.dta", clear
	gen x="F.ldest:legal_french"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 											
	********************* 
	**  22 legal german *
	*********************	
						
	use "eba_ldest_22.dta", clear
	gen x="F.ldest:legal_german"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 											
	******************* 
	**  23 legal scan *
	*******************	
						
	use "eba_ldest_23.dta", clear
	gen x="F.ldest:legal_scan"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
		
 	***************** 
	**  24 Literacy *
	*****************	
						
	use "eba_ldest_24.dta", clear
	gen x="F.ldest:literacy"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 											
 	******************* 
	**  25 lp_catho80 *
	*******************	
						
	use "eba_ldest_25.dta", clear
	gen x="F.ldest:lp_catho80"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 											
 	********************* 
	**  26  lp_protmg80 *
	*********************	
						
	use "eba_ldest_26.dta", clear
	gen x="F.ldest:lp_protmg80"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 																				
 	************** 
	**  27 media *
	**************	
						
	use "eba_ldest_27.dta", clear
	gen x="F.ldest:mediafreedom"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 											
 	************* 
	**  28 mena *
	*************	
						
	use "eba_ldest_28.dta", clear
	gen x="F.ldest:mena"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 																					
 	****************** 
	**  29 migration *
	******************	
						
	use "eba_ldest_29.dta", clear
	gen x="F.ldest:migration_net"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 											
 	************************** 
	**  30  mortality_under5 *
	**************************	
						
	use "eba_ldest_30.dta", clear
	gen x="F.ldest:mortality_under5"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
				
	****************** 
	** 31 muslimave **
	******************	
						
	use "eba_ldest_31.dta", clear
	gen x="F.ldest:lp_muslim80"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	************* 
	** 32 OECD **
	*************	
						
	use "eba_ldest_32.dta", clear
	gen x="F.ldest:oecd"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	************************ 
	** 33 peacekeepersfl  **
	************************	
						
	use "eba_ldest_33.dta", clear
	gen x="F.ldest:peacekeepersfl"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
 	************************ 
	** 34 peacekeeperssl  **
	************************	
						
	use "eba_ldest_34.dta", clear
	gen x="F.ldest:peacekeepersl"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
 	**************** 
	** 35 Polity  **
	****************	
						
	use "eba_ldest_35.dta", clear
	gen x="F.ldest:polity2"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
  	************* 
	** 36 Pop  **
	*************	
						
	use "eba_ldest_36.dta", clear
	gen x="F.ldest:pop"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
  	********************** 
	** 37 prevention_3p **
	**********************	
						
	use "eba_ldest_37.dta", clear
	gen x="F.ldest:prevention_3p"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
  	************************ 
	** 38 prostitutionlaw **
	************************	
						
	use "eba_ldest_38.dta", clear
	gen x="F.ldest:prostitutionlaw"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */

	***************** 
	**  39 protect **
	*****************	
						
	use "eba_ldest_39.dta", clear
	gen x="F.ldest:protection_3p"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 	
	************* 
	**  40 PVE **
	*************	
						
	use "eba_ldest_40.dta", clear
	gen x="F.ldest:pve"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	********************* 
	**  41 refugees_dl **
	*********************	
						
	use "eba_ldest_41.dta", clear
	gen x="F.ldest:refugees_dl"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 				
	****************** 
	**  42 religion **
	******************	
						
	use "eba_ldest_42.dta", clear
	gen x="F.ldest:religion"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 				
	************** 
	**  43  RLE **
	**************	
						
	use "eba_ldest_43.dta", clear
	gen x="F.ldest:rle"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 				
	*************** 
	**  44 SASIA **
	***************
						
	use "eba_ldest_44.dta", clear
	gen x="F.ldest:sasia"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 				
	************* 
	**  45 SSA **
	*************
						
	use "eba_ldest_45.dta", clear
	gen x="F.ldest:ssa"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 				
	***************** 
	**  46 tourism **
	*****************
						
	use "eba_ldest_46.dta", clear
	gen x="F.ldest:ssa"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 				
	*************** 
	**  47 trade **
	***************
						
	use "eba_ldest_47.dta", clear
	gen x="F.ldest:trade"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 				
	********************** 
	**  48 unemployment **
	**********************	
						
	use "eba_ldest_48.dta", clear
	gen x="F.ldest:unemployment"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 				
	****************** 
	**  49 urbanpop **
	******************	
						
	use "eba_ldest_49.dta", clear
	gen x="F.ldest:urbanpop"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 				
	*************
	**  50 vae **
	*************	
						
	use "eba_ldest_50.dta", clear
	gen x="F.ldest:vae"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 				
	******************* 
	**  51 visa_dest **
	*******************	
						
	use "eba_ldest_51.dta", clear
	gen x="F.ldest:visa_dest"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 				
	***************
	**  52 wecon **
	***************
						
	use "eba_ldest_52.dta", clear
	gen x="F.ldest:wecon"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 				
	*****************
	**  53 english **
	*****************
						
	use "eba_ldest_53.dta", clear
	gen x="F.ldest:english"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 				
	**************** 
	**  54 french **
	****************	
						
	use "eba_ldest_54.dta", clear
	gen x="F.ldest:french"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 				
	**************** 
	**  55 german **
	****************	
						
	use "eba_ldest_55.dta", clear
	gen x="F.ldest:german"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 				
	***************** 
	**  56 spanish **
	*****************	
						
	use "eba_ldest_56.dta", clear
	gen x="F.ldest:spanish"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 															
	******************** 
	**  57 portuguese **
	********************	
						
	use "eba_ldest_57.dta", clear
	gen x="F.ldest:portuguese"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 															
	******************** 
	**  58 landlocked **
	********************	
						
	use "eba_ldest_58.dta", clear
	gen x="F.ldest:landlocked"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 															
 	
						
		
		
		
	*********** 
	** 0 GDP **
	***********		
		
		
	local var "F.ldest:gdppcl"
		
		
		** 1 **
		use	eba_ldest_1.dta, clear
		keep if var=="`var'"
		save `var'1.dta, replace
 
 		** 2 **
		use	eba_ldest_2.dta, clear
		keep if var=="`var'"
		save `var'2.dta, replace
 
 		** 3 **
		use	eba_ldest_3.dta, clear
		keep if var=="`var'"
		save `var'3.dta, replace
 
 		** 4 **
		use	eba_ldest_4.dta, clear
		keep if var=="`var'"
		save `var'4.dta, replace
 
 		** 5 **
		use	eba_ldest_5.dta, clear
		keep if var=="`var'"
		save `var'5.dta, replace
 
 		** 6 **
		use	eba_ldest_6.dta, clear
		keep if var=="`var'"
		save `var'6.dta, replace
 
 		** 7 **
		use	eba_ldest_7.dta, clear
		keep if var=="`var'"
		save `var'7.dta, replace
 
 		** 8 **
		use	eba_ldest_8.dta, clear
		keep if var=="`var'"
		save `var'8.dta, replace
 
 		** 9 **
		use	eba_ldest_9.dta, clear
		keep if var=="`var'"
		save `var'9.dta, replace
 
 		** 10 **
		use	eba_ldest_10.dta, clear
		keep if var=="`var'"
		save `var'10.dta, replace

		** 11 **
		use	eba_ldest_11.dta, clear
		keep if var=="`var'"
		save `var'11.dta, replace
 
 		** 12 **
		use	eba_ldest_12.dta, clear
		keep if var=="`var'"
		save `var'12.dta, replace
 
 		** 13 **
		use	eba_ldest_13.dta, clear
		keep if var=="`var'"
		save `var'13.dta, replace
 
 		** 14 **
		use	eba_ldest_14.dta, clear
		keep if var=="`var'"
		save `var'14.dta, replace
 
 		** 15 **
		use	eba_ldest_15.dta, clear
		keep if var=="`var'"
		save `var'15.dta, replace
 
 		** 16 **
		use	eba_ldest_16.dta, clear
		keep if var=="`var'"
		save `var'16.dta, replace
 
 		** 17 **
		use	eba_ldest_17.dta, clear
		keep if var=="`var'"
		save `var'17.dta, replace
 
 		** 18 **
		use	eba_ldest_18.dta, clear
		keep if var=="`var'"
		save `var'18.dta, replace
 
 		** 19 **
		use	eba_ldest_19.dta, clear
		keep if var=="`var'"
		save `var'19.dta, replace
 
 		** 20 **
		use	eba_ldest_20.dta, clear
		keep if var=="`var'"
		save `var'20.dta, replace		
		
		** 21 **
		use	eba_ldest_21.dta, clear
		keep if var=="`var'"
		save `var'21.dta, replace
 
 		** 22 **
		use	eba_ldest_22.dta, clear
		keep if var=="`var'"
		save `var'22.dta, replace
 
 		** 23 **
		use	eba_ldest_23.dta, clear
		keep if var=="`var'"
		save `var'23.dta, replace
 
 		** 24 **
		use	eba_ldest_24.dta, clear
		keep if var=="`var'"
		save `var'24.dta, replace
 
 		** 25 **
		use	eba_ldest_25.dta, clear
		keep if var=="`var'"
		save `var'25.dta, replace
 
 		** 26 **
		use	eba_ldest_26.dta, clear
		keep if var=="`var'"
		save `var'26.dta, replace
 
 		** 27 **
		use	eba_ldest_27.dta, clear
		keep if var=="`var'"
		save `var'27.dta, replace
 
 		** 28 **
		use	eba_ldest_28.dta, clear
		keep if var=="`var'"
		save `var'28.dta, replace
 
 		** 29 **
		use	eba_ldest_29.dta, clear
		keep if var=="`var'"
		save `var'29.dta, replace
 
 		** 30 **
		use	eba_ldest_30.dta, clear
		keep if var=="`var'"
		save `var'30.dta, replace		
		
		** 31 **
		use	eba_ldest_31.dta, clear
		keep if var=="`var'"
		save `var'31.dta, replace
 
 		** 32 **
		use	eba_ldest_32.dta, clear
		keep if var=="`var'"
		save `var'32.dta, replace
 
 		** 33 **
		use	eba_ldest_33.dta, clear
		keep if var=="`var'"
		save `var'33.dta, replace
 
 		** 34 **
		use	eba_ldest_34.dta, clear
		keep if var=="`var'"
		save `var'34.dta, replace
 
 		** 35 **
		use	eba_ldest_35.dta, clear
		keep if var=="`var'"
		save `var'35.dta, replace
 
 		** 36 **
		use	eba_ldest_36.dta, clear
		keep if var=="`var'"
		save `var'36.dta, replace
 
 		** 37 **
		use	eba_ldest_37.dta, clear
		keep if var=="`var'"
		save `var'37.dta, replace
 
 		** 38 **
		use	eba_ldest_38.dta, clear
		keep if var=="`var'"
		save `var'38.dta, replace
 
 		** 39 **
		use	eba_ldest_39.dta, clear
		keep if var=="`var'"
		save `var'39.dta, replace
 
 		** 40 **
		use	eba_ldest_40.dta, clear
		keep if var=="`var'"
		save `var'40.dta, replace		
		
		** 41 **
		use	eba_ldest_41.dta, clear
		keep if var=="`var'"
		save `var'41.dta, replace
 
 		** 42 **
		use	eba_ldest_42.dta, clear
		keep if var=="`var'"
		save `var'42.dta, replace
 
 		** 43 **
		use	eba_ldest_43.dta, clear
		keep if var=="`var'"
		save `var'43.dta, replace
 
 		** 44 **
		use	eba_ldest_44.dta, clear
		keep if var=="`var'"
		save `var'44.dta, replace
 
 		** 45 **
		use	eba_ldest_45.dta, clear
		keep if var=="`var'"
		save `var'45.dta, replace
 
 		** 46 **
		use	eba_ldest_46.dta, clear
		keep if var=="`var'"
		save `var'46.dta, replace
 
 		** 47 **
		use	eba_ldest_47.dta, clear
		keep if var=="`var'"
		save `var'47.dta, replace
 
 		** 48 **
		use	eba_ldest_48.dta, clear
		keep if var=="`var'"
		save `var'48.dta, replace
 
 		** 49 **
		use	eba_ldest_49.dta, clear
		keep if var=="`var'"
		save `var'49.dta, replace
 
 		** 50 **
		use	eba_ldest_50.dta, clear
		keep if var=="`var'"
		save `var'50.dta, replace
		
		** 51 **
		use	eba_ldest_51.dta, clear
		keep if var=="`var'"
		save `var'51.dta, replace
 
 		** 52 **
		use	eba_ldest_52.dta, clear
		keep if var=="`var'"
		save `var'52.dta, replace
 
 		** 53 **
		use	eba_ldest_53.dta, clear
		keep if var=="`var'"
		save `var'53.dta, replace
 
 		** 54 **
		use	eba_ldest_54.dta, clear
		keep if var=="`var'"
		save `var'54.dta, replace
 
 		** 55 **
		use	eba_ldest_55.dta, clear
		keep if var=="`var'"
		save `var'55.dta, replace
 
 		** 56 **
		use	eba_ldest_56.dta, clear
		keep if var=="`var'"
		save `var'56.dta, replace
 
 		** 57 **
		use	eba_ldest_57.dta, clear
		keep if var=="`var'"
		save `var'57.dta, replace
 
 		** 58 **
		use	eba_ldest_58.dta, clear
		keep if var=="`var'"
		save `var'58.dta, replace
 
 		
 	 
		use	`var'1.dta, clear		
		append using `var'2.dta
		append using `var'3.dta		
		append using `var'4.dta		
		append using `var'5.dta		
		append using `var'6.dta		
		append using `var'7.dta		
		append using `var'8.dta		
		append using `var'9.dta		
		append using `var'10.dta		
 		append using `var'11.dta	
		append using `var'12.dta
		append using `var'13.dta		
		append using `var'14.dta		
		append using `var'15.dta		
		append using `var'16.dta		
		append using `var'17.dta		
		append using `var'18.dta		
		append using `var'19.dta		
		append using `var'20.dta				
 		append using `var'21.dta	
		append using `var'22.dta
		append using `var'23.dta		
		append using `var'24.dta		
		append using `var'25.dta		
		append using `var'26.dta		
		append using `var'27.dta		
		append using `var'28.dta		
		append using `var'29.dta		
		append using `var'30.dta			
 		append using `var'31.dta	
		append using `var'32.dta
		append using `var'33.dta		
		append using `var'34.dta		
		append using `var'35.dta		
		append using `var'36.dta		
		append using `var'37.dta		
		append using `var'38.dta		
		append using `var'39.dta		
		append using `var'40.dta		
 		append using `var'41.dta	
		append using `var'42.dta
		append using `var'43.dta		
		append using `var'44.dta		
		append using `var'45.dta		
		append using `var'46.dta		
		append using `var'47.dta		
		append using `var'48.dta, force		
		append using `var'49.dta, force		
		append using `var'50.dta, force		
 		append using `var'51.dta, force	
		append using `var'52.dta, force
		append using `var'53.dta, force		
		append using `var'54.dta, force		
		append using `var'55.dta, force		
		append using `var'56.dta, force		
		append using `var'57.dta, force		
		append using `var'58.dta, force		
	
		save eba_ldest_gdp.dta, replace

		erase `var'1.dta		
		erase `var'2.dta
		erase `var'3.dta		
		erase `var'4.dta		
		erase `var'5.dta		
		erase `var'6.dta		
		erase `var'7.dta		
		erase `var'8.dta		
		erase `var'9.dta		
		erase `var'10.dta		
		erase `var'11.dta	
		erase `var'12.dta
		erase `var'13.dta		
		erase `var'14.dta		
		erase `var'15.dta		
		erase `var'16.dta		
		erase `var'17.dta		
		erase `var'18.dta		
		erase `var'19.dta		
		erase `var'20.dta				
		erase `var'21.dta	
		erase `var'22.dta
		erase `var'23.dta		
		erase `var'24.dta		
		erase `var'25.dta		
		erase `var'26.dta		
		erase `var'27.dta		
		erase `var'28.dta		
		erase `var'29.dta		
		erase `var'30.dta			
		erase `var'31.dta	
		erase `var'32.dta
		erase `var'33.dta		
		erase `var'34.dta		
		erase `var'35.dta		
		erase `var'36.dta		
		erase `var'37.dta		
		erase `var'38.dta		
		erase `var'39.dta		
		erase `var'40.dta		
		erase `var'41.dta	
		erase `var'42.dta
		erase `var'43.dta		
		erase `var'44.dta		
		erase `var'45.dta		
		erase `var'46.dta		
		erase `var'47.dta		
		erase `var'48.dta		
		erase `var'49.dta		
		erase `var'50.dta		
		erase `var'51.dta	
		erase `var'52.dta
		erase `var'53.dta		
		erase `var'54.dta		
		erase `var'55.dta		
		erase `var'56.dta		
		erase `var'57.dta		
		erase `var'58.dta		
		
		** 1.1. regressions calculated
		codebook _id
		** 1.3. beta mean & se   **
		sum coef if var=="F.ldest:gdppcl"
		** 1.4.  %(significant != 0)  **
 		count if var=="F.ldest:gdppcl" & pval<=.05 & pval~=.
		** 1.5 CDF **	
		sort coef
		cumul coef if var=="F.ldest:gdppcl", gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
		
